<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery.js"></script>
    <script>
        $(function(){
            // alert()
            $(".fa ul li").click(function(){
                $(this).css("background","gray").siblings().css("background","#fff")

                let ind = $(this).index();
                $(".children .item").eq(ind).show().siblings().hide()
            })
        })
    </script>
    <style>
        *{
            margin: 0;
            padding: 0;
            border: 1px solid red;
        }
        .fa ul li{
            float: left;
            width: 100px;
        }
        .fa .children{
            clear: both;

        
        }
        .fa .children .item{
            display: none;
        }
        .show{
            display: block;
        }
        .hide{
            display: none;
        }
    </style>
</head>
<body>
    <div class="fa">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
        </ul>
        <div class="children">
            <div class="item " style="display: block;">
                内容一
            </div>
            <div class="item ">
                内容一2
            </div>
            <div class="item ">
                内容一3
            </div>
            <div class="item ">
                内容一4
            </div>
            <div class="item ">
                内容一5
            </div>
        </div>
    </div>
</body>
</html>